3.1182 \(\int \cos ^{\frac{3}{2}}(c+d x) (A+B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=65 \[ \frac{2 (A+3 C) \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )}{3 d}+\frac{2 A \sin (c+d x) \sqrt{\cos (c+d x)}}{3 d}+\frac{2 B E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d} \]

[Out]

(2*B*EllipticE[(c + d*x)/2, 2])/d + (2*(A + 3*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*A*Sqrt[Cos[c + d*x]]*Si
n[c + d*x])/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.103866, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {4064, 3023, 2748, 2641, 2639} \[ \frac{2 (A+3 C) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d}+\frac{2 A \sin (c+d x) \sqrt{\cos (c+d x)}}{3 d}+\frac{2 B E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(2*B*EllipticE[(c + d*x)/2, 2])/d + (2*(A + 3*C)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*A*Sqrt[Cos[c + d*x]]*Si
n[c + d*x])/(3*d)

Rule 4064

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(m_)*((A_.) + (B_.)*sec[(e_.) + (f_.)*(x_)] + (C_.)*sec[(e_.) + (f_.)*(x_)
]^2), x_Symbol] :> Dist[b^2, Int[(b*Cos[e + f*x])^(m - 2)*(C + B*Cos[e + f*x] + A*Cos[e + f*x]^2), x], x] /; F
reeQ[{b, e, f, A, B, C, m}, x] &&  !IntegerQ[m]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 2641

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticF[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ
[{c, d}, x]

Rule 2639

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticE[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ[{
c, d}, x]

Rubi steps

\begin{align*} \int \cos ^{\frac{3}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \frac{C+B \cos (c+d x)+A \cos ^2(c+d x)}{\sqrt{\cos (c+d x)}} \, dx\\ &=\frac{2 A \sqrt{\cos (c+d x)} \sin (c+d x)}{3 d}+\frac{2}{3} \int \frac{\frac{1}{2} (A+3 C)+\frac{3}{2} B \cos (c+d x)}{\sqrt{\cos (c+d x)}} \, dx\\ &=\frac{2 A \sqrt{\cos (c+d x)} \sin (c+d x)}{3 d}+B \int \sqrt{\cos (c+d x)} \, dx+\frac{1}{3} (A+3 C) \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx\\ &=\frac{2 B E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{d}+\frac{2 (A+3 C) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d}+\frac{2 A \sqrt{\cos (c+d x)} \sin (c+d x)}{3 d}\\ \end{align*}

Mathematica [C]  time = 6.20482, size = 682, normalized size = 10.49 \[ -\frac{2 B \csc (c) \cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac{\tan (c) \sin \left (\tan ^{-1}(\tan (c))+d x\right ) \text{HypergeometricPFQ}\left (\left \{-\frac{1}{2},-\frac{1}{4}\right \},\left \{\frac{3}{4}\right \},\cos ^2\left (\tan ^{-1}(\tan (c))+d x\right )\right )}{\sqrt{\tan ^2(c)+1} \sqrt{1-\cos \left (\tan ^{-1}(\tan (c))+d x\right )} \sqrt{\cos \left (\tan ^{-1}(\tan (c))+d x\right )+1} \sqrt{\cos (c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}}-\frac{\frac{\tan (c) \sin \left (\tan ^{-1}(\tan (c))+d x\right )}{\sqrt{\tan ^2(c)+1}}+\frac{2 \cos ^2(c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}{\sin ^2(c)+\cos ^2(c)}}{\sqrt{\cos (c) \sqrt{\tan ^2(c)+1} \cos \left (\tan ^{-1}(\tan (c))+d x\right )}}\right )}{d (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)}-\frac{4 A \csc (c) \cos ^2(c+d x) \sqrt{1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin (c) \left (-\sqrt{\cot ^2(c)+1}\right ) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \text{HypergeometricPFQ}\left (\left \{\frac{1}{4},\frac{1}{2}\right \},\left \{\frac{5}{4}\right \},\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right )}{3 d \sqrt{\cot ^2(c)+1} (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)}-\frac{4 C \csc (c) \cos ^2(c+d x) \sqrt{1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin (c) \left (-\sqrt{\cot ^2(c)+1}\right ) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt{\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \text{HypergeometricPFQ}\left (\left \{\frac{1}{4},\frac{1}{2}\right \},\left \{\frac{5}{4}\right \},\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right )}{d \sqrt{\cot ^2(c)+1} (A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C)}+\frac{\cos ^{\frac{5}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac{4 A \sin (c) \cos (d x)}{3 d}+\frac{4 A \cos (c) \sin (d x)}{3 d}-\frac{4 B \cot (c)}{d}\right )}{A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*((-4*B*Cot[c])/d + (4*A*Cos[d*x]*Sin[c])/(3*d) + (
4*A*Cos[c]*Sin[d*x])/(3*d)))/(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x]) - (4*A*Cos[c + d*x]^2*Csc[c]*Hy
pergeometricPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Sec[d*
x - ArcTan[Cot[c]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]]*Sqrt[-(Sqrt[1 + Cot[c]^2]*Sin[c]*Sin[d*x - ArcTan[Cot[
c]]])]*Sqrt[1 + Sin[d*x - ArcTan[Cot[c]]]])/(3*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*Sqrt[1 + Co
t[c]^2]) - (4*C*Cos[c + d*x]^2*Csc[c]*HypergeometricPFQ[{1/4, 1/2}, {5/4}, Sin[d*x - ArcTan[Cot[c]]]^2]*(A + B
*Sec[c + d*x] + C*Sec[c + d*x]^2)*Sec[d*x - ArcTan[Cot[c]]]*Sqrt[1 - Sin[d*x - ArcTan[Cot[c]]]]*Sqrt[-(Sqrt[1
+ Cot[c]^2]*Sin[c]*Sin[d*x - ArcTan[Cot[c]]])]*Sqrt[1 + Sin[d*x - ArcTan[Cot[c]]]])/(d*(A + 2*C + 2*B*Cos[c +
d*x] + A*Cos[2*c + 2*d*x])*Sqrt[1 + Cot[c]^2]) - (2*B*Cos[c + d*x]^2*Csc[c]*(A + B*Sec[c + d*x] + C*Sec[c + d*
x]^2)*((HypergeometricPFQ[{-1/2, -1/4}, {3/4}, Cos[d*x + ArcTan[Tan[c]]]^2]*Sin[d*x + ArcTan[Tan[c]]]*Tan[c])/
(Sqrt[1 - Cos[d*x + ArcTan[Tan[c]]]]*Sqrt[1 + Cos[d*x + ArcTan[Tan[c]]]]*Sqrt[Cos[c]*Cos[d*x + ArcTan[Tan[c]]]
*Sqrt[1 + Tan[c]^2]]*Sqrt[1 + Tan[c]^2]) - ((Sin[d*x + ArcTan[Tan[c]]]*Tan[c])/Sqrt[1 + Tan[c]^2] + (2*Cos[c]^
2*Cos[d*x + ArcTan[Tan[c]]]*Sqrt[1 + Tan[c]^2])/(Cos[c]^2 + Sin[c]^2))/Sqrt[Cos[c]*Cos[d*x + ArcTan[Tan[c]]]*S
qrt[1 + Tan[c]^2]]))/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x]))

________________________________________________________________________________________

Maple [B]  time = 2.191, size = 274, normalized size = 4.2 \begin{align*} -{\frac{2}{3\,d}\sqrt{ \left ( 2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1 \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}} \left ( 4\,A\cos \left ( 1/2\,dx+c/2 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+A\sqrt{ \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) ,\sqrt{2} \right ) -2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}\cos \left ( 1/2\,dx+c/2 \right ) A-3\,B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) +3\,C\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) \right ){\frac{1}{\sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}}}} \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}{\frac{1}{\sqrt{2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x)

[Out]

-2/3*((2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(4*A*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^4+A*(s
in(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))-2*sin(1/2*d*
x+1/2*c)^2*cos(1/2*d*x+1/2*c)*A-3*B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(co
s(1/2*d*x+1/2*c),2^(1/2))+3*C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*
d*x+1/2*c),2^(1/2)))/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1/2*d*x+1/2*c)/(2*cos(1/2*d*x+1/
2*c)^2-1)^(1/2)/d

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{\frac{3}{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

integrate((C*sec(d*x + c)^2 + B*sec(d*x + c) + A)*cos(d*x + c)^(3/2), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (C \cos \left (d x + c\right ) \sec \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) \sec \left (d x + c\right ) + A \cos \left (d x + c\right )\right )} \sqrt{\cos \left (d x + c\right )}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

integral((C*cos(d*x + c)*sec(d*x + c)^2 + B*cos(d*x + c)*sec(d*x + c) + A*cos(d*x + c))*sqrt(cos(d*x + c)), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**(3/2)*(A+B*sec(d*x+c)+C*sec(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{\frac{3}{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

integrate((C*sec(d*x + c)^2 + B*sec(d*x + c) + A)*cos(d*x + c)^(3/2), x)